<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs for page function_query.php</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="file-name">/includes/function_query.php</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-functions">Functions</a>
			</div>
	<div class="info-box-body">	
		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">关于数据库查询的函数库</p>
<p class="description"><p>$Id: _includes---function_query.php.html 171 2010-10-22 09:04:17Z bwanglei@gmail.com $</p></p>
		
			</div>
</div>
		

	
	
	
	<a name="sec-functions"></a>	
	<div class="info-box">
		<div class="info-box-title">Functions</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<span class="disabled">Functions</span>
		</div>
		<div class="info-box-body">	
			<a name="functionapf_add_read_count_thread" id="functionapf_add_read_count_thread"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">apf_add_read_count_thread</span> (line <span class="line-number">285</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">帖子阅读次数加1</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			apf_add_read_count_thread
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$tid</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$count</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$tid</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$count</span>			</li>
				</ul>
		
	
</div>
<a name="functionapf_add_thread" id="functionapf_add_thread"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">apf_add_thread</span> (line <span class="line-number">296</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">添加新主题</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			apf_add_thread
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$title</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$content</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$banmian_id</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$username</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$title</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$content</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$banmian_id</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$username</span>			</li>
				</ul>
		
	
</div>
<a name="functionapf_articles_banmian" id="functionapf_articles_banmian"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">apf_articles_banmian</span> (line <span class="line-number">83</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得某个版面的主题信息</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			apf_articles_banmian
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$mysql_conn</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$banmian_id</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$num_page</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$apf_settings</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">&#039;all&#039;</span>])
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$mysql_conn</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$banmian_id</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$num_page</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$apf_settings</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$type</span>			</li>
				</ul>
		
	
</div>
<a name="functionapf_banmian_query" id="functionapf_banmian_query"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">apf_banmian_query</span> (line <span class="line-number">10</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得所有分区和版面信息并返回为一个数组</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			apf_banmian_query
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$mysql_conn</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$mysql_conn</span>			</li>
				</ul>
		
	
</div>
<a name="functionapf_count_articles_thread" id="functionapf_count_articles_thread"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">apf_count_articles_thread</span> (line <span class="line-number">141</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得主题下帖子个数</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			apf_count_articles_thread
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$thread_id</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$mysql_conn</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$thread_id</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$mysql_conn</span>			</li>
				</ul>
		
	
</div>
<a name="functionapf_count_page_thread" id="functionapf_count_page_thread"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">apf_count_page_thread</span> (line <span class="line-number">156</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得主题下的分页数</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			apf_count_page_thread
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$per_page_count</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$thread_id</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$mysql_conn</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$per_page_count</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$thread_id</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$mysql_conn</span>			</li>
				</ul>
		
	
</div>
<a name="functionapf_del_article" id="functionapf_del_article"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">apf_del_article</span> (line <span class="line-number">223</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">根据 article id 删除帖子</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			apf_del_article
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$aid</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$aid</span>			</li>
				</ul>
		
	
</div>
<a name="functionapf_del_thread" id="functionapf_del_thread"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">apf_del_thread</span> (line <span class="line-number">234</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">删除主题和主题下的所有帖子</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			apf_del_thread
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$tid</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$tid</span>			</li>
				</ul>
		
	
</div>
<a name="functionapf_edit_banmian_count" id="functionapf_edit_banmian_count"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">apf_edit_banmian_count</span> (line <span class="line-number">370</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得后台修改版面的页面数</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			apf_edit_banmian_count
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$banmian_id</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$per_count</span> = <span class="var-default">15</span>])
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$banmian_id</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$per_count</span>			</li>
				</ul>
		
	
</div>
<a name="functionapf_get_article" id="functionapf_get_article"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">apf_get_article</span> (line <span class="line-number">249</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">获取某个帖子的信息</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			apf_get_article
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$aid</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$aid</span>			</li>
				</ul>
		
	
</div>
<a name="functionapf_get_article_thread_banmian" id="functionapf_get_article_thread_banmian"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">apf_get_article_thread_banmian</span> (line <span class="line-number">119</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得某个版面的主题线索和全部帖子信息</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			apf_get_article_thread_banmian
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$banmian_id</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$num_page</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$banmian_id</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$num_page</span>			</li>
				</ul>
		
	
</div>
<a name="functionapf_get_banmians" id="functionapf_get_banmians"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">apf_get_banmians</span> (line <span class="line-number">318</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">列出版面</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			apf_get_banmians
		</span>
					([<span class="var-type"></span>&nbsp;<span class="var-name">$banmian</span> = <span class="var-default">&#039;all&#039;</span>])
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$banmian</span>			</li>
				</ul>
		
	
</div>
<a name="functionapf_get_count_pages_banmian" id="functionapf_get_count_pages_banmian"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">apf_get_count_pages_banmian</span> (line <span class="line-number">68</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得版面的版面分页总数</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			apf_get_count_pages_banmian
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$mysql_conn</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$id_banmian</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$apf_settings</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$mysql_conn</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$id_banmian</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$apf_settings</span>			</li>
				</ul>
		
	
</div>
<a name="functionapf_get_count_thread_banmian" id="functionapf_get_count_thread_banmian"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">apf_get_count_thread_banmian</span> (line <span class="line-number">58</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">获得版面下的主题总数</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			apf_get_count_thread_banmian
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$mysql_conn</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$banmian_id</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$mysql_conn</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$banmian_id</span>			</li>
				</ul>
		
	
</div>
<a name="functionapf_get_read_count_thread" id="functionapf_get_read_count_thread"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">apf_get_read_count_thread</span> (line <span class="line-number">270</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得当前主题阅读次数</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			apf_get_read_count_thread
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$tid</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$tid</span>			</li>
				</ul>
		
	
</div>
<a name="functionapf_get_thread" id="functionapf_get_thread"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">apf_get_thread</span> (line <span class="line-number">165</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得一个主题下的帖子</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			apf_get_thread
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$mysql_conn</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$thread_id</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$num_page</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$apf_settings</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$mysql_conn</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$thread_id</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$num_page</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$apf_settings</span>			</li>
				</ul>
		
	
</div>
<a name="functionapf_get_user_articles" id="functionapf_get_user_articles"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">apf_get_user_articles</span> (line <span class="line-number">204</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得某用户所参与的帖子</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			apf_get_user_articles
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$username</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$page_count</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$per_page</span> = <span class="var-default">15</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$page_num</span> = <span class="var-default">0</span>])
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$username</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$page_count</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$per_page</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$page_num</span>			</li>
				</ul>
		
	
</div>
<a name="functionapf_table_count" id="functionapf_table_count"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">apf_table_count</span> (line <span class="line-number">47</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得某个表的记录总数</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			apf_table_count
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$mysql_conn</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$table</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$mysql_conn</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$table</span>			</li>
				</ul>
		
	
</div>
<a name="functionapf_toFixLen" id="functionapf_toFixLen"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">apf_toFixLen</span> (line <span class="line-number">400</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">截取字符串函数 固定长度字符串的截取</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			apf_toFixLen
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$str</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$len</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$str</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$len</span>			</li>
				</ul>
		
	
</div>
<a name="functionapf_user_article_page_count" id="functionapf_user_article_page_count"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">apf_user_article_page_count</span> (line <span class="line-number">187</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得某个用户发送帖子所组成的总页数</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			apf_user_article_page_count
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$username</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$per_page</span> = <span class="var-default">15</span>])
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$username</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$per_page</span>			</li>
				</ul>
		
	
</div>
<a name="functionget_thread_article_onbanmian" id="functionget_thread_article_onbanmian"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">get_thread_article_onbanmian</span> (line <span class="line-number">382</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得某个版面的主题和帖子信息</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			get_thread_article_onbanmian
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$banmian_id</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$per_count</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$num_page</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$banmian_id</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$per_count</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$num_page</span>			</li>
				</ul>
		
	
</div>
		</div>
	</div>
	
	<p class="notes" id="credit">
		Documentation generated on Tue, 06 Jul 2010 19:18:45 +0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>